//
//  BLEManager.h
//  flutter_easy_permission
//
//  Created by 杰理科技 on 2021/9/6.
//

#import <Foundation/Foundation.h>
#import <JL_BLEKit/JL_BLEKit.h>
#import "DeviceEntity.h"

NS_ASSUME_NONNULL_BEGIN

/**
 *  BLE状态通知
 */
extern NSString *kFLT_BLE_FOUND;         //发现设备
extern NSString *kFLT_BLE_PAIRED;        //已配对
extern NSString *kFLT_BLE_CONNECT_FAIL;  //连接失败
extern NSString *kFLT_BLE_DISCONNECTED;  //断开连接
extern NSString *kFLT_BLE_ON;            //BLE开启
extern NSString *kFLT_BLE_OFF;           //BLE关闭

extern NSString *kFLT_BLE_OTA;           //强制升级

@interface BLEManager : NSObject
@property(assign,nonatomic)CBManagerState   mBleManagerState;
@property(strong,nonatomic)CBPeripheral     *__nullable mBlePeripheral;
@property(assign,nonatomic)BOOL             isFilter;
@property(assign,nonatomic)BOOL             isPaired;
@property(strong,nonatomic)NSString         *lastUUID;
@property(strong,nonatomic)NSString         *mBleName;
@property(strong,nonatomic)JL_Assist        *mAssist;

-(void)startScanTimer;
-(void)stopScanTimer;

-(void)startScanBLE;
-(void)stopScanBLE;

-(void)connectBLE:(CBPeripheral*)peripheral;
-(void)connectPeripheralWithUUID:(NSString*)uuid;
-(void)disconnectBLE;



@end

NS_ASSUME_NONNULL_END
